package com.xcfw.dorm.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.Objects;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Assistant {
    private Integer id;

    private Integer schoolId;

    private String name;

    private Long phone;

    private Long qq;

    private String weixin;

    private Integer sex;

    private String limits;

    private String haveClass;

    private String office;

    private String password;

    private String uuid;

    private Date updateTime;

    private Date createTime;

    private Integer pageNum;

    private Integer pageSize;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        Assistant assistant = (Assistant) o;
        return Objects.equals(schoolId, assistant.schoolId) &&
                Objects.equals(name, assistant.name) &&
                Objects.equals(phone, assistant.phone) &&
                Objects.equals(qq, assistant.qq) &&
                Objects.equals(weixin, assistant.weixin) &&
                Objects.equals(sex, assistant.sex) &&
                Objects.equals(limits, assistant.limits) &&
                Objects.equals(haveClass, assistant.haveClass) &&
                Objects.equals(office, assistant.office) &&
                Objects.equals(password, assistant.password);
    }

    @Override
    public int hashCode() {

        return Objects.hash(super.hashCode(), schoolId, name, phone, qq, weixin, sex, limits, haveClass, office, password);
    }
}